package com.atguigu.exam;

public class TestChar {
    public static void main(String args[]) {
		int count = 0;
		if (args.length != 0) {
			System.out.println(args[0]);
			if ((int) args[0].charAt(0) >= 65 && (int) args[0].charAt(0) <= 90) {
				for (int i = 0; i <args[0].length(); i++) {
					if ((int) args[0].charAt(i) >= 65
							&& (int) args[0].charAt(i) <= 90) {
						System.out.print(args[0].charAt(i));
						count++;
					}
				}
				System.out.println();
				System.out.println("共有 " + count + " 个大写字母。");
			} else
				System.out.println("第一个字母不是大写字母!");
		} else
			System.out.println("请给出命令行参数!");
	}
}